package com.swhysc.information.controller;

import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value ="/log")
@Slf4j
@Api(value = "HibernateValidatorController", tags = "HibernateValidatorController")
public class HibernateValidatorController {
    @GetMapping(value ="/test")
    @ResponseBody
    public ResponseEntity testValidation6(){
        RuntimeException e = new RuntimeException("aaaa");
        log.trace("trace~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        log.debug("debug~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        log.info("info~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        log.warn("warn~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        log.error("程序异常, 详细信息:{}", e.getLocalizedMessage() , e);
        return ResponseEntity.ok("200");
    }
}